#ifndef UNCONSTRAINEDPROBLEM_HPP_
#define UNCONSTRAINEDPROBLEM_HPP_

#include "Problem.hpp"

class UnconstrainedProblem: public Problem {
public:
	UnconstrainedProblem(Index dimension) : Problem(dimension) {};

	/************* NEW METHODS TO OVERRIDE **************/
	virtual bool get_nlp_info(Index& n, Index& nnz_h_lag) = 0;

	virtual bool get_starting_point(Index n, Number* x) = 0;

	//evaluated if x is updated in calls to shadowed functions,
	//if you use init_x in (eval_h/f/grad_f) you should implement this
	//and call also from specified functions if init_x == true
	virtual void newX(const Number* x) = 0;

	/****************** PROXIES ******************/

	bool get_blocks_indexes(Index n, Index m, Index procCount, Index* procStartIndex);

	bool get_nlp_info(Index& n, Index& m, Index& nnz_jac_g, Index& nnz_h_lag,
			IndexStyleEnum& index_style);

	bool get_bounds_info(Index n, Number* x_l, Number* x_u, Index m,
			Number* g_l, Number* g_u);

	bool
			get_starting_point(Index n, bool init_x, Number* x, bool init_z,
					Number* z_L, Number* z_U, Index m, bool init_lambda,
					Number* lambda);

	bool eval_g(Index n, const Number* x, bool new_x, Index m, Number* g);

	bool eval_jac_g(Index n, const Number* x, bool new_x, Index m,
			Index nele_jac, Index* iRow, Index *jCol, Number* values);

	bool eval_h(Index n, const Number* x, bool new_x, Number obj_factor,
			Index m, const Number* lambda, bool new_lambda, Index nele_hess,
			Index* iRow, Index* jCol, Number* values);

};

#endif /* UNCONSTRAINEDPROBLEM_HPP_ */
